<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		2014年月份：<input type="text" id="minth"  /><br />
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日:<input type="text" id="day" /><br />
		<button type="button" onclick="cal()">计算</button><br />
		<span >结果</span>
		<script type="text/javascript">
			function cal(){
			let minth=document.getElementById("minth").value;	
			let d_day=document.getElementById("day").value;
			let month=parseInt(minth);
			let day=parseInt(d_day);
			console.log(day);
				switch (month){
					case 12:
						day+=31;
					case 11:
						day+=30;
					case 10:
						day+=31;
					case 9:
						day+=30;
					case 8:
						day+=31;
					case 7:
						day+=30;
					case 6:
						day+=31;
					case 5:
						day+=30;
					case 4:
						day+=31;
					case 3:
						day+28;
					case 2:
						day+=31;
					case 1:
						day;
					
				}
				let span1=document.getElementsByTagName("span")[0];
				span1.innerText="是2014年的第"+day+"天";
			}
		</script>
	</body>
</html>
